Introduction to the problem domain and dataset

We love listening to all types of music. Therefore, when we are going to top hits playlists, we wondered why certain songs tended to dominant in the Spotify playlists, so we want to ask the question, “what factors allow songs to be popular?” We took to a dataset that was pulled from the Spotify API. The dataset contains 603 songs. For each song, there is information about bpm, nrgy, dnce, dB, live, val, dur, acous, spch, pop. We will use these features to determine a certain feature that impacts popularity directly.

Looking at the data overall, since we are looking at the most popular songs, here is the popularity score to better understand what it means – 66.52. There are a lot of genres in this dataset; there are 50 genres! The most popular genre, which is determined by the highest average popularity is escape room. The top artist overall though is determined through the artist with the most songs in the top of Spotify. The top artist is Katy Perry.

Summary about Spotify Genres

To get a better idea of popularity specific to genre on Spotify, we aggregated our data and found the number of songs with that genre and the mean of the popularity for each of the genres. BPM and Danceability are also included since they will be used later in visualizations. Count of the songs were included since this is a top songs compilation of data, so more songs in the top ranks of popularity were included more. Here is just a small set of our data since there are many genres.

Top Genre Average Popularity Total No. Tracks Average Danceability Average BPM
escape room 90.0 2 69.5 127.0
brostep 86.0 2 60.5 121.0
alternative r&b 84.0 1 90.0 136.0
irish singer-songwriter 81.0 1 57.0 129.0
celtic rock 80.0 1 42.0 85.0
danish pop 80.0 1 77.0 120.0
electronic trap 79.5 2 74.5 98.0
edm 78.2 5 63.6 100.4
canadian contemporary r&b 77.7 9 54.6 127.0
electropop 77.5 13 64.7 112.8
contemporary country 76.0 1 47.0 86.0
pop 74.8 60 68.4 117.1
electro 74.5 2 81.0 108.0
canadian hip hop 73.5 2 78.0 109.0
detroit hip hop 73.5 2 61.5 84.5

Observation:

Chart 1: Popularity and beats per minute (BPM)

This plot was intended to show the correlation between a song’s tempo and its popularity.

Note: Popularity index was taken from spotify’s popularity index.The higher the value, the more popular the song was (100 meaning the highest possible level of popularity attainable on Spotify). The grey area indicates all the values (songs with respective bpm and popularity level), with the blue line being the best fit line.

Observation:

From the line plot, we can see that as as the popularity level of a song increases, the bpm (tempo) increases, peaking at about 121bpm.

This relationship changes once we pass a popularity level of 72, where the downward-sloping part of the plot shows that the higher the popularity level, the lower the bpm. We can see that songs with high popularity level approaching the 100 level have decreasing tempo that approaches 103 bpm. This implies that songs that are more popular amongst the general music audience have lower bpm, possiblying showing that slow songs have been more popular.

We also note that there is a large error margin (seen in the grey area), where songs of the same popularity can have either very high bpm or very low bpm. As such, it is important to note that there are many variables which can contribute a song’s popularity. Although there is a correlation between the tempo of a song and its popularity, causation is not proven.